package com.wxtech.heartbeat.model;

public class Device extends BaseModel {

	public static final int SIZE_OF_DEVICE_ID = 8;
	
	private String device_id;

	public Device() {
		super();
	}

	public Device(String id) {
		super();		
		device_id = id;
	}
	public String getDevice_id() {
		return device_id;
	}

	public void setDevice_id(String device_id) {
		this.device_id = device_id;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((device_id == null) ? 0 : device_id.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Device other = (Device) obj;
		if (device_id == null) {
			if (other.device_id != null)
				return false;
		} else if (!device_id.equals(other.device_id))
			return false;
		return true;
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder(super.toString());
		builder.append("Device [device_id=").append(device_id).append("]");
		return builder.toString();
	}

}
